#include "chathistroy.h"
#include <QDebug>
ChatHistroyLib* ChatHistroyLib::chatlib=nullptr;

ChatHistroyLib::ChatHistroyLib(){}

ChatHistroyLib *ChatHistroyLib::getInstance()
{
    if(chatlib==nullptr)
    {
        chatlib=new ChatHistroyLib();
    }
    return chatlib;
}

void ChatHistroyLib::setOC(QString oc)
{
    if(oc==this->oc)
        return;
    this->oc=oc;

}

QString ChatHistroyLib::getOC()
{
    return this->oc;
}

QList<QPair<bool, QString> >& ChatHistroyLib::getChatHistroyList()
{
    return chathistorylist;
}

void ChatHistroyLib::recvChatHistroyPage(const QList<QPair<bool, QString>>& result)
{
    this->chathistorylist=result;
    emit s_chatHistroyPageDone();
}



